
//
//  Alertor.m
//  Snigger
//
//  Created by Young on 16/8/23.
//  Copyright © 2016年 Smile. All rights reserved.
//

#import "Alertor.h"

@implementation Alertor

+ (Alertor *)sharedAlertor {
    static Alertor *alertor;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (!alertor) {
            alertor = [Alertor new];
        }
    });
    return alertor;
}

- (UIAlertController *)alertWithTitle:(NSString *)title message:(NSString *)message actionTitle:(NSString *)actionTitle {
    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:(UIAlertControllerStyleAlert)];
    UIAlertAction *action = [UIAlertAction actionWithTitle:actionTitle style:(UIAlertActionStyleDefault) handler:nil];
    [alertController addAction:action];
    return alertController;
}

@end
